From fcc50db02ae6d43672d4c930a7bbf6cd2a903d2f Mon Sep 17 00:00:00 2001 From: Debian LibreOffice Maintainers Date: Wed, 28 Jan 2026 21:03:25 +0100 Subject: [PATCH] we-dont-have-the-needed-fonts Gbp-Pq: Name we-dont-have-the-needed-fonts.diff --- sd/qa/unit/export-tests.cxx | 66 ------------------------ sw/qa/core/text/text.cxx | 5 ++ vcl/qa/cppunit/complextext.cxx | 43 --------------- vcl/qa/cppunit/pdfexport/pdfexport2.cxx | Bin 284606 -> 284990 bytes 4 files changed, 5 insertions(+), 109 deletions(-) diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 15c867227d8..775edef34b8 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -1063,72 +1063,6 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfTextPos) assertXPath(pXml, "//textarray", 1); } -CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfFont) -{ - auto pPdfium = vcl::pdf::PDFiumLibrary::get(); - if (!pPdfium) - return; - UsePdfium aGuard; - - loadFromFile(u"pdf/differentfonts.pdf"); - - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - setImportFilterName(TestFilter::FODG); - saveAndReload(TestFilter::FODG); - - xmlDocUniquePtr pXml = parseLayout(); - { - OUString sItalic = getXPath(pXml, "//font[2]", "italic"); - // was "none" before - CPPUNIT_ASSERT_EQUAL(u"normal"_ustr, sItalic); - // check that the others remain as expected - OUString sFontName = getXPath(pXml, "//font[2]", "name"); - CPPUNIT_ASSERT_EQUAL(u"Liberation Serif"_ustr, sFontName); - int nFontHeight = getXPath(pXml, "//font[2]", "height").toInt32(); - CPPUNIT_ASSERT_EQUAL(494, nFontHeight); - } -#if !defined _WIN32 - //TODO, debug this - { - OUString sWeight = getXPath(pXml, "//font[3]", "weight"); - // was "normal" before - CPPUNIT_ASSERT_EQUAL(u"bold"_ustr, sWeight); - // check that the others remain as expected - OUString sFontName = getXPath(pXml, "//font[3]", "name"); - CPPUNIT_ASSERT_EQUAL(u"Liberation Sans"_ustr, sFontName); - sal_Int32 nFontHeight = getXPath(pXml, "//font[3]", "height").toInt32(); - CPPUNIT_ASSERT_EQUAL(564, nFontHeight); - } -#endif -} - -CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfHindi) -{ - auto pPdfium = vcl::pdf::PDFiumLibrary::get(); - if (!pPdfium) - return; - UsePdfium aGuard; - - loadFromFile(u"pdf/BasicHindi.pdf"); - - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - save(TestFilter::FODG); - - xmlDocUniquePtr pXmlDoc = parseExportedFile(); - - // Check that the English text in here is correct at least - - // ensure the expected content - assertXPathContent(pXmlDoc, - "/office:document/office:body/office:drawing/draw:page/draw:g/draw:frame[3]/" - "draw:text-box/text:p[@text:style-name='P4'][1]", - u"FIRST-YEAR HINDI COURSE"); - - // ensure the expected font name - assertXPath(pXmlDoc, "/office:document/office:automatic-styles/style:style[@style:name='P4']/" - "style:text-properties[@style:font-name='AcademyEngravedLetPlain']"); -} - CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfGrayscaleImageUnderInvisibleTest) { auto pPdfium = vcl::pdf::PDFiumLibrary::get(); diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index 5eef468719c..1d75c321f98 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -9,6 +9,8 @@ #include +#include + #include #include @@ -1594,6 +1596,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testParaUpperMarginFlyIntersect) CPPUNIT_ASSERT_EQUAL(521, nHeight); } +/* needs Source Han Serif SC*/ +#if HAVE_MORE_FONTS CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810) { // Load the document. @@ -1630,6 +1634,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810) } } } +#endif CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testScriptinfosurrogatePairs) { diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 5b4e36ac88c..8793ecb4719 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -790,49 +790,6 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf165510) } } -CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf154104) -{ - ScopedVclPtrInstance pOutDev; - - vcl::Font aBaseFont{ u"David Libre"_ustr, u"Regular"_ustr, Size{ 0, 72 } }; - pOutDev->SetFont(aBaseFont); - - vcl::Font aFallbackFont{ u"Noto Sans Arabic"_ustr, u"Regular"_ustr, Size{ 0, 72 } }; - pOutDev->ForceFallbackFont(aFallbackFont); - - pOutDev->SetLayoutMode(vcl::text::ComplexTextLayoutFlags::BiDiRtl - | vcl::text::ComplexTextLayoutFlags::BiDiStrong); - - auto aText = u"\u05D0\u05D0\u05D0\u0644\u0627"_ustr; - KernArray aKernArray = { 100, 200, 300, 350, 400 }; - auto pLayout = pOutDev->ImplLayout(aText, /*nIndex*/ 0, /*nLen*/ aText.getLength(), - /*rLogicPos*/ Point(0, 0), /*nLogicWidth*/ 0, aKernArray); - - // Fallback must have happened for this test to be meaningful - auto pMultiLayout = dynamic_cast(pLayout.get()); - CPPUNIT_ASSERT(pMultiLayout); - - std::vector aCharX; - - const GlyphItem* pGlyph = nullptr; - basegfx::B2DPoint stPos; - int nCurrPos = 0; - while (pLayout->GetNextGlyph(&pGlyph, stPos, nCurrPos)) - { - aCharX.push_back(stPos.getX()); - } - - // tdf#154104 caused overlapping glyphs in fallback runs: - // { -295.0, -195.0, -95.0, -341.0 } - std::vector aRefCharX{ -245.0, -145.0, -45.0, -341.0 }; - - CPPUNIT_ASSERT_EQUAL(aRefCharX.size(), aCharX.size()); - for (size_t i = 0; i < aRefCharX.size(); ++i) - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(aRefCharX.at(i), aCharX.at(i), /*delta*/ 0.2); - } -} - CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf163761) { ScopedVclPtrInstance pOutDev; diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx index b9c560f422b58d0bce437547a04d771f522424f1..328bc109057c27db6d4a7b78dee3326c1bc94f26 100644 GIT binary patch delta 883 zcmY+AL2DCH5XWgIQi-)Ok_uK+rh?E-YeLXAl!y>eX$~rBMG$FZ6JN7S(_PKJBuJ=9 zp(k$=?Ne!!_7k*-B6!Hfiw6bkH)sWe7sZQb-|TLax`#J!=0E@6%-i;Mp#3ILU+r7< zyoKMQ7RHjrEWBxQ6X#UJ!emj+>bZyy!&ug>l3FM{#)4@s>P8+_j$G3%=dc)Cl2;Qe zW^oY{sB?5mtjr9oX!6k1GTFE$ji$j+H!LoJ>;chJm}k63wp_{5%M8a1lVg@S4pwAJ z1XBj8m@6>Vz&ke_2N|*@j?}ChlFcxu6-}AhbGc@g@`PW=T`1_5+(|PlmNeNfx~f}h zwjdYbxL_6~qrVafM}5(#_$A=7N5)-*iR1Cu^yHKx%TNjaZ7NqWtWAo_)6W5s!YtHFBs=AvNge-JYG4_X=r$zS+aX?iaw*y`E*4 zN0A9z7-+&7YCA~$ zqUy>ANTo~p+U!vVr{^QQs4tBvN0xg(wIpZf|vHwKU>n)fiJ+KBria%PAk+Ctl z6B3(iFmvc065lsrJlOjOh|4sCFv%?#5)TFVj>;L%WLY{-L|dwEfxnxy4kdw0^Ao7f VvK+q`?-_?g$LV?hcMCqf`v+Pi1N8s^ delta 258 zcmYMsKT85(00wa0d$1tL)4?K443`TM;hIiwXmcuPmvrhYINA+<1HB$E;qJKm0D=~` zIY^L$ldXb7&>ASs`f8!u51v26esb7LT20YZUhzZzc3`$fw|Q0_9JWT~6dMjMBF)0H zp#P3LI$fMZ))xv2g^N?pYlv~RkTP7HGi@WyPY*d(+t7I5Mx5Q9raP&&OkX@CSpL_3 zTcEkbC9ixOZ-q+nf%+2HbbNVdej~$@i@2ie(ZI%sU@yP{Ln6gVATOn|!k|Z-aYh`8 T;-7CqsC?Sg9;Kpsi1FJRa3f!V -- 2.30.2